package com.zzyl.nursing.controller.member;

import com.zzyl.common.core.domain.R;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.domain.NursingProject;
import com.zzyl.nursing.dto.PageDto;
import com.zzyl.nursing.service.NursingProjectMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/member/orders/project")
public class MemberProjectController {
    @Autowired
    private NursingProjectMemberService nursingProjectMemberService;
    @GetMapping("/page")
    public TableDataInfo<NursingProject> syncProductList(PageDto nursingProjectMemberPageDto) {
        TableDataInfo<NursingProject> nursingProject = nursingProjectMemberService.syncProductList(nursingProjectMemberPageDto);
        return nursingProject;
    }

    @GetMapping("/{id}")
    public R<NursingProject> getById(@PathVariable Integer id) {
        NursingProject nursingProject = nursingProjectMemberService.getNursingProjectById(id);
        return R.ok(nursingProject);
    }


}
